package com.linkage.lcims.base.po.system;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="MD_BB_BINDATTR_DEF"
 *     
*/

@SuppressWarnings("serial")
public class MdBbBindattrDef implements Serializable {

    /** identifier field */
    private Integer attrid;

    /** persistent field */
    private String attrname;

    /** full constructor */
    public MdBbBindattrDef(Integer attrid, String attrname) {
        this.attrid = attrid;
        this.attrname = attrname;
    }

    /** default constructor */
    public MdBbBindattrDef() {
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.Integer"
     *             column="attrid"
     *         
     */
    public Integer getAttrid() {
        return this.attrid;
    }

    public void setAttrid(Integer attrid) {
        this.attrid = attrid;
    }

    /** 
     *            @hibernate.property
     *             column="attrname"
     *             length="20"
     *             not-null="true"
     *         
     */
    public String getAttrname() {
        return this.attrname;
    }

    public void setAttrname(String attrname) {
        this.attrname = attrname;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("attrid", getAttrid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof MdBbBindattrDef) ) return false;
        MdBbBindattrDef castOther = (MdBbBindattrDef) other;
        return new EqualsBuilder()
            .append(this.getAttrid(), castOther.getAttrid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getAttrid())
            .toHashCode();
    }

}
